import request from '@/utils/request'


export function listSite() {
  return request({
    url: '/orders/site/list',
    method: 'get'
  })
}

export function selectUserSite(query) {
  return request({
    url: '/orders/site/selectUserSite',
    method: 'get',
    params: query
  })
}

// 新增收货地址
export function addSite(data) {
  return request({
    url: '/orders/site',
    method: 'post',
    data: data
  })
}

// 新增收货地址
export function deleteSiteId(siteId) {
  return request({
    url: '/orders/site/deleteSiteId/' + siteId,
    method: 'DELETE'
  })
}

// 新增收货地址
export function selectSiteId(siteId) {
  return request({
    url: '/orders/site/selectSiteId/' + siteId,
    method: 'GET'
  })
}

// 新增收货地址
export function updateSite(data) {
  return request({
    url: '/orders/site/updateSite',
    method: 'PUT',
    data: data
  })
}

// 新增收货地址
export function defultSiteById(siteId) {
  return request({
    url: '/orders/site/defultSiteById/' + siteId,
    method: 'PUT'
  })
}
